In conventional database systems, user-written design-time objects (e.g., queries or procedures) are optimized by a compiler to create an execution plan for an underlying execution engine and corresponding database hardware. For example, optimization of design-time objects written in a procedural language such as SQLScript includes techniques such as SQL statement inlining, dead code elimination, and control flow simplification. These optimizations often result in an execution plan which bears little resemblance to the design-time objects from which it was generated.
More specifically, the transformations which occur during optimization obscure associations between elements of the optimized execution plan and elements of the design-time objects from which the execution plan was generated. This limits the ability of end-users or database engine developers to identify elements of the design-time objects which should be modified to address performance or functionality issues. It is therefore desirable to improve the ability to understand correspondences between design-time objects and elements of an execution plan generated therefrom.